package com.sheledon.flyCat.core.aop.factory;

import com.sheledon.flyCat.core.aop.intercept.BeanProcessor;
import com.sheledon.flyCat.core.aop.intercept.CglibProxyProcessor;
import com.sheledon.flyCat.core.aop.intercept.JdkProxyProcessor;

/**
 * @author sheledon
 */
public class AopProxyProcessorFactory {
    public static BeanProcessor get(Class<?> clazz){
        return clazz.getInterfaces().length>0 ?
                new JdkProxyProcessor():
                new CglibProxyProcessor();
    }
}
